package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.system.pojo.SysCompany;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface SysCompanyMapper extends BaseMapper<SysCompany> {
    @Select("SELECT c.* FROM sys_company_user u INNER JOIN sys_company c ON u.`company_id` = c.`id` WHERE u.`user_id`=#{userId};")
    List<SysCompany> queryUserJoinCompany(@Param("userId") Long userId);



}
